{include file="pageheader_erp.htm"}

<link href="styles/erp_warehousing.css" rel="stylesheet" type="text/css" />

{insert_scripts files="../js/jquery.1.3.2.js"}
{insert_scripts files="../js/jquery.blockUI.2.23.js"}


{if $act eq 'edit'}
{if $warehousing_info.available_act.edit eq 1}
<script type=text/javascript>
	
	function edit_warehousing()
	{
		$("#select_warehouse").show();
		$("#span_warehouse").hide();		
		$("#select_warehousing_style").show();
		$("#span_warehousing_style").hide();	
		$("#span_warehousing_from").hide();
		$("#input_warehousing_from").show();							
	}


	function post_warehousing(warehousing_id)
	{
		function postWarehousingResponse(res)
		{
			if(res.error!=0)
			{
				alert(res.message);
			}
			else{
				window.document.location="./erp_warehouse_manage.php?act=warehousing_list";
			}				
		}
		if(confirm('{$lang.erp_warehousing_sure_to_post_warehousing}'))
		{	
			Ajax.call('erp_warehousing.php?act=post_warehousing', 'warehousing_id='+warehousing_id, postWarehousingResponse, 'POST', 'JSON');
		}
	}	
		
	function delete_warehousing(warehousing_id)
	{
		function deleteWarehousingResponse(res)
		{
			if(res.error!=0)
			{
				alert(res.message);
			}
			else{
				window.document.location="erp_warehouse_manage.php?act=warehousing_list";;
			}			
		}
		if(confirm('{$lang.erp_warehousing_sure_to_delete_warehousing}'))
		{	
			Ajax.call('erp_warehousing.php?act=delete_warehousing', 'warehousing_id='+warehousing_id, deleteWarehousingResponse, 'POST', 'JSON');
		}			
	}
	
	function edit_warehousing_item(warehousing_item_id)
	{
		$("#span_received_qty_"+warehousing_item_id).hide();
		$("#input_received_qty_"+warehousing_item_id).show().focus();
	}
	
	function delete_warehousing_item(warehousing_item_id)
	{
		var warehousing_id='{$warehousing_info.warehousing_id}';
		
		function deleteWarehousingItemResponse(res)
		{
			if(res.error!=0)
			{
				alert(res.message);
			}
			else{
				window.document.location="erp_warehouse_manage.php?act=edit_warehousing&id="+warehousing_id;
			}			
		}
		
		if(confirm('{$lang.erp_warehousing_sure_to_delete_warehousing_item}'))
		{	
			Ajax.call('erp_warehousing.php?act=delete_warehousing_item', 'warehousing_id='+warehousing_id+'&warehousing_item_id='+warehousing_item_id, deleteWarehousingItemResponse, 'POST', 'JSON');
		}		
	}	

	
	$(document).ready(function(){
		
		//更改收货仓库
		$("#span_warehouse").css('cursor','pointer');
		$("#span_warehouse").mouseover(function(){
			$(this).css('color','red');
		});
		$("#span_warehouse").mouseout(function(){
			$(this).css('color','black');
		});	
		$("#span_warehouse").click(function(){
			$(this).hide();
			$("#select_warehouse").show().focus();
		});
		$("#select_warehouse").change(function(){
			var warehouse_id=$(this).attr('value');
			var warehousing_id='{$warehousing_info.warehousing_id}';
			
			if(warehouse_id==0)
			{
				return;
			}
			
			function changeWarehouseResponse(res)
			{
				if(res.error!=0)
				{
					alert(res.message);
				}
				else{
					window.document.location="erp_warehouse_manage.php?act=edit_warehousing&id="+warehousing_id;
				}
			}
			
			if(confirm('{$lang.erp_warehousing_sure_to_change_warehouse}'))
			{
					Ajax.call('erp_warehousing.php?act=change_warehouse', 'warehousing_id='+warehousing_id+'&warehouse_id='+warehouse_id, changeWarehouseResponse, 'POST', 'JSON');
			}
			else{
				$("#select_warehouse").hide();
				$("#span_warehouse").show();
			}
		});		
		
		//更改入库类型
		$("#span_warehousing_style").css('cursor','pointer');
		$("#span_warehousing_style").mouseover(function(){
			$(this).css('color','red');
		});
		$("#span_warehousing_style").mouseout(function(){
			$(this).css('color','black');
		});	
		$("#span_warehousing_style").click(function(){
			$(this).hide();
			$("#select_warehousing_style").show().focus();
		});
		$("#select_warehousing_style").change(function(){
			var warehousing_style_id=$(this).attr('value');
			var warehousing_id='{$warehousing_info.warehousing_id}';
			
			function changeWarehousingStyleResponse(res)
			{
				if(res.error!=0)
				{
					alert(res.message);
				}
				else{
					window.document.location="erp_warehouse_manage.php?act=edit_warehousing&id="+warehousing_id;
				}
			}
			
			if(confirm('{$lang.erp_warehousing_sure_to_change_warehousing_style}'))
			{
					Ajax.call('erp_warehousing.php?act=change_warehousing_style', 'warehousing_id='+warehousing_id+'&warehousing_style_id='+warehousing_style_id, changeWarehousingStyleResponse, 'POST', 'JSON');
			}
			else{
				$("#select_warehousing_style").hide();
				$("#span_warehousing_style").show();				
			}
		});			
					
		//更改关联订单
		$("#span_order").css('cursor','pointer');
		$("#span_order").mouseover(function(){
			$(this).css('color','red');
		});
		$("#span_order").mouseout(function(){
			$(this).css('color','black');
		});	
		$("#span_order").click(function(){
			$(this).hide();
			$("#select_order").show().focus();
		});
		$("#select_order").change(function(){
			var order_id=$(this).attr('value');
			var warehousing_id='{$warehousing_info.warehousing_id}';
			
			function changeOrderResponse(res)
			{
				if(res.error!=0)
				{
					alert(res.message);
				}
				else{
					window.document.location="erp_warehouse_manage.php?act=edit_warehousing&id="+warehousing_id;
				}
			}
			if(order_id!='')
			{
			if(confirm('{$lang.erp_warehousing_sure_to_change_order}'))
			{
					Ajax.call('erp_warehousing.php?act=change_order', 'warehousing_id='+warehousing_id+'&order_id='+order_id, changeOrderResponse, 'POST', 'JSON');
			}
			else{
				$("#select_order").hide();
				$("#span_order").show();				
			}
			}
		});

		//更改交货人
		$("#span_warehousing_from").css('cursor','pointer');
		$("#span_warehousing_from").mouseover(function(){
			$(this).css('color','red');
		});
		$("#span_warehousing_from").mouseout(function(){
			$(this).css('color','black');
		});	
		$("#span_warehousing_from").click(function(){
			$(this).hide();
			$("#input_warehousing_from").show().focus();
		});	
		$("#input_warehousing_from").change(function(){
			var warehousing_from=$(this).attr('value');
			var warehousing_id='{$warehousing_info.warehousing_id}';
			
			function changeWarehousingFromResponse(res)
			{
				if(res.error!=0)
				{
					alert(res.message);
				}
				else{
					window.document.location="erp_warehouse_manage.php?act=edit_warehousing&id="+warehousing_id;
				}
			}
			
			if(warehousing_from=='')
			{
				alert('{$lang.erp_warehousing_warehousing_from_required}');
			}
			else{
				
			if(confirm('{$lang.erp_warehousing_sure_to_change_warehousing_from}'))
			{
					Ajax.call('erp_warehousing.php?act=change_warehousing_from', 'warehousing_id='+warehousing_id+'&warehousing_from='+warehousing_from, changeWarehousingFromResponse, 'POST', 'JSON');
			}
			else{
				$("#span_warehousing_from").hide();
				$("#input_warehousing_from").show();				
			}
			}
		});
		$("#input_warehousing_from").blur(function(){
				$("#span_warehousing_from").show();
				$("#input_warehousing_from").hide();				
		});
		
		//更改实收数量
		$("span[id^='span_received_qty_']").css('cursor','pointer');
		$("span[id^='span_received_qty_']").mouseover(function(){
			$(this).css('color','red');
		});
		$("span[id^='span_received_qty_']").mouseout(function(){
			$(this).css('color','black');
		});	
		$("span[id^='span_received_qty_']").click(function(){
			var warehousing_item_id=$(this).attr('id');
			warehousing_item_id=warehousing_item_id.substr('span_received_qty_'.length,warehousing_item_id.length-'span_received_qty_'.length);			
			
			$(this).hide();
			$("#input_received_qty_"+warehousing_item_id).show().focus();
		});	
		
		$("input[id^='input_received_qty_']").change(function(){
			var warehousing_item_id=$(this).attr('id');
			warehousing_item_id=warehousing_item_id.substr('input_received_qty_'.length,warehousing_item_id.length-'input_received_qty_'.length);
			
			var warehousing_id='{$warehousing_info.warehousing_id}';
			var received_qty=$(this).attr('value');
			
			function changeReceivedQtyResponse(res)
			{
				if(res.error!=0)
				{
					alert(res.message);
					$("#span_received_qty_"+warehousing_item_id).show();	
					$("#input_received_qty_"+warehousing_item_id).attr('value',$("#span_received_qty_"+warehousing_item_id).text()).hide();
				}
				else{
					$("#span_received_qty_"+warehousing_item_id).text(received_qty);
					$("#input_received_qty_"+warehousing_item_id).hide();
					$("#span_received_qty_"+warehousing_item_id).show();
				}
			}
			
			if(isNaN(received_qty))
			{
				alert('{$lang.erp_not_a_number}');
			}
			else{
				if(confirm('{$lang.erp_warehousing_sure_to_change_received_qty}'))
				{
					Ajax.call('erp_warehousing.php?act=change_received_qty', 'warehousing_id='+warehousing_id+'&warehousing_item_id='+warehousing_item_id+"&received_qty="+received_qty, changeReceivedQtyResponse, 'POST', 'JSON');
				}
				else{
					$("#span_received_qty_"+warehousing_item_id).show();	
					$("#input_received_qty_"+warehousing_item_id).attr('value',$("#span_received_qty_"+warehousing_item_id).text()).hide();
				}
			}
		});
		$("input[id^='input_received_qty_']").blur(function(){
			var warehousing_item_id=$(this).attr('id');
			warehousing_item_id=warehousing_item_id.substr('input_received_qty_'.length,warehousing_item_id.length-'input_received_qty_'.length);			
			$("#span_received_qty_"+warehousing_item_id).show();
			
			$(this).hide();
		});
		
		
		$("#input_goods_sn").focus();
		
		$("#input_goods_sn").change(function(){
			var goods_sn=$(this).attr('value');
	
			function checkGoodsSnResponse(res)
			{
				if(res.error!=0)
				{
					alert(res.message);
					$("#input_goods_sn").focus();
					$("#input_goods_sn").attr('value','');
				}
				else{
					$("#attr_box").html(res.attr_info);
					$("#input_qty").focus();
				}
			}
			if(goods_sn=='')
			{
				alert('{$lang.erp_warehousing_goods_sn_required}');
			}
			else{
				Ajax.call('erp_warehousing.php?act=check_goods_sn', 'goods_sn='+goods_sn, checkGoodsSnResponse, 'POST', 'JSON');
			}
		});



		
		$("#input_qty").keyup(function(){
			var input_qty=$(this).attr('value');
			var last_char=input_qty.substr(input_qty.length-1,1);
			if(isNaN(last_char))
			{
				//alert('{$lang.erp_not_a_number}');
				$(this).attr('value',input_qty.substr(0,input_qty.length-1));
			}
		});	
			
		$("#img_submit_warehousing").click(function(){
			
			var goods_sn=$("#input_goods_sn").attr('value');
			
			var goods_qty=$("#input_qty").attr('value');
			
			var warehousing_id='{$warehousing_info.warehousing_id}';
			
			var ids='';
			
			$("select[id^='select_attr_']").each(function(index){
				
				var value=$($("select[id^='select_attr_']")[index]).attr('value');
				
				ids=ids+value+',';
			});
			
			function updateWarehousingResponse(res)
			{
				if(res.error!=0)
				{
					alert(res.message);
				}
				else{
					window.document.location="erp_warehouse_manage.php?act=edit_warehousing&id="+warehousing_id;
				}
			}
			
			if(goods_sn=='')
			{
				alert('{$lang.erp_warehousing_goods_sn_required}');	
			}
			else{
				Ajax.call('erp_warehousing.php?act=update_warehousing', 'warehousing_id='+warehousing_id+'&goods_sn='+goods_sn+'&ids='+ids+'&goods_qty='+goods_qty, updateWarehousingResponse, 'POST', 'JSON');
			}
		});
		
	});
	
	function batchWarehousing()
	{
		var file_name=$("#file_batch_warehousing").attr('value');
		var file_ext_name=file_name.substr(file_name.length-3,3);
		
		if(file_ext_name!='txt')
		{
			alert('{$lang.erp_warehousing_only_text_file}');
			return false;
		}
		else{
			return true;
		}
	}
	
	
</script>
{/if}
{/if}


{if $warehousing_info.available_act.approve eq 1}

<!-- start approve remark -->

<div class="approve_remark" id="approve_remark">
<div class="approve_remark_head">
	<table cellpadding="0" cellspacing="0" border='0'>
		<tr>
			<td>
				<img src="./images/approve_remark.gif" />
			</td>
			<td align="right">
				<span><img style="cursor:pointer;" id="img_close_approve_remark" src="./images/close_erp.gif" /></span>
			</td>
		</tr>
	</table>
</div>

<div class="approve_remark_box">
<table  cellpadding="5" cellspacing="0" border='0'>
	 <tr>
    	<td width="60">{$lang.erp_approve_remark}</td>	
		<td>
			<textarea rows="8" cols="55" id="textarea_approve_remark">{$warehousing_info.approve_remark}</textarea>
		</td>
	</tr>	
</table>
</div>
<div class="div_submit_approve">
	<img style="cursor:pointer;" id="img_submit_approve" src="./images/submit.gif" />
</div>	
</div>
 
<!-- end approve remark -->

<script type=text/javascript>

	function withdrawal_to_edit(warehousing_id)
	{
		function withdrawalToEditResponse(res)
		{
			if(res.error!=0)
			{
				alert(res.message);
			}
			else{
				window.document.location="./erp_warehouse_manage.php?act=warehousing_list";
			}
		}
		if(confirm('{$lang.erp_warehousing_sure_to_withdrawal_to_edit}'))
		{	
			Ajax.call('erp_warehousing.php?act=withdrawal_to_edit', 'warehousing_id=' + warehousing_id, withdrawalToEditResponse, 'POST', 'JSON');
		}			
	}	
	

	
	$(document).ready(function(){
			$("#img_close_approve_remark").click(function(){
				$.unblockUI();
			});
	});
		
	function approve_warehousing(warehousing_id,act)
	{
			function approveWarehousingResponse(res)
			{
				if(res.error!=0)
				{
					alert(res.message);
				}
				else{
					window.document.location="./erp_warehouse_manage.php?act=warehousing_list";
				}
			}
			
			if(act=='pass')
			{
				$("#img_submit_approve").bind('click',function(){
				var approve_remark=$("#textarea_approve_remark").attr('value');
				if(confirm('{$lang.erp_warehousing_sure_to_post_approve}'))
				{
					Ajax.call('erp_warehousing.php?act=approve_pass', 'warehousing_id='+warehousing_id+'&approve_remark='+approve_remark, approveWarehousingResponse, 'POST', 'JSON');
				}
				else{
					$.unblockUI();
					$(this).unbind('click');			
				}					
				});
	
				$.blockUI({
			   	message: $('#approve_remark'), css: { 
			    top:  ($(window).height()-200) /2 + 'px', 
			    left: ($(window).width()-500) /2 + 'px'
			   }
			});	
			}
			else if(act=='reject')
			{
				$("#img_submit_approve").bind('click',function(){
				var approve_remark=$("#textarea_approve_remark").attr('value');
				if(confirm('{$lang.erp_warehousing_sure_to_post_approve}'))
				{
					Ajax.call('erp_warehousing.php?act=approve_reject', 'warehousing_id='+warehousing_id+'&approve_remark='+approve_remark, approveWarehousingResponse, 'POST', 'JSON');
				}
				else{
					$.unblockUI();
					$(this).unbind('click');			
				}					
				});
				$.blockUI({
			   	message: $('#approve_remark'), css: { 
			    top:  ($(window).height()-200) /2 + 'px', 
			    left: ($(window).width()-500) /2 + 'px'
			   	}			
				});
			}
		}
		
</script>		
{/if}

<!-- start warehousing info -->
 <div class="list-div" id="listDiv">
<table  cellpadding="3" cellspacing="1">
  <tr>
    <th>{$lang.erp_warehousing_sn}</th>	
	<th width="15%">{$lang.erp_warehousing_warehouse}</th>
	<th>{$lang.erp_warehousing_admin}</th>		
 	<th width="15%">{$lang.erp_warehousing_warehousing_style}</th>	
	<th width="10%">{$lang.erp_warehousing_order}</th>	
	<th width="10%">{$lang.erp_warehousing_from}</th>
	<th width="10%">{$lang.erp_warehousing_date}</th>
	{if $act neq 'view'}
	<th width="15%">{$lang.erp_operation}</th>
	{/if}
  </tr>
  
 	<tr>
		<td align="center">{$warehousing_info.warehousing_sn}</td>
		<td align="center">
			<span id="span_warehouse">{$warehousing_info.warehouse_info.name}</span>
			{if $warehouse_info}
			<select name="select_warehouse" id="select_warehouse" style="display:none;">
				<option value="0" >{$lang.erp_warehousing_select_warehouse}</option>
				{foreach from=$warehouse_info item=warehouse_info}
					<option value="{$warehouse_info.warehouse_id}" {if $warehouse_info.warehouse_id eq $warehousing_info.warehouse_id}selected="selected"{/if}>{$warehouse_info.name}</option>
				{/foreach}
			</select>
			{/if}
		</td>
		<td align="center">{$warehousing_info.admin_name}</td>
		<td align="center">
			<span id="span_warehousing_style">{$warehousing_info.warehousing_style_info.warehousing_style}</span>
			{if $warehousing_style_info}
			<select name="select_warehousing_style" id="select_warehousing_style" style="display:none;">
				{foreach from=$warehousing_style_info item=warehousing_style_info}
					<option value="{$warehousing_style_info.warehousing_style_id}" {if $warehousing_style_info.warehousing_style_id eq $warehousing_info.warehousing_style_id}selected="selected"{/if}>{$warehousing_style_info.warehousing_style}</option>
				{/foreach}
			</select>
			{/if}			
			
		</td>
		<td align="center">
			
			<span id="span_order">
				{if $warehousing_info.order_info.order_sn}
					{$warehousing_info.order_info.order_sn}
				{else}
					{if $order_info}
						{$lang.erp_warehousing_choose_order}
					{else}
						&nbsp;
					{/if}
				{/if}
			</span>
			
			{if $order_info}
			<select name="select_order" id="select_order" style="display:none;">
				<option value="">{$lang.erp_warehousing_choose_order}</option>
				{foreach from=$order_info item=order_info}
					<option value="{$order_info.order_id}" {if $order_info.order_id eq $warehousing_info.order_id}selected="selected"{/if}>{$order_info.order_sn}</option>
				{/foreach}
			</select>
			{/if}		
		</td>
		<td align="center">
			<span id="span_warehousing_from">
				{if $warehousing_info.warehousing_from}
					{$warehousing_info.warehousing_from}
				{else}
					{$lang.erp_warehousing_input_warehousing_from}
				{/if}
			</span>
			<input id="input_warehousing_from" size="10" maxlength="10" style="display:none;" value="{$warehousing_info.warehousing_from}"/>
		</td>
		<td align="center">{$warehousing_info.warehousing_date}</td>
		{if $act neq 'view'}
		<td align="center">
			
			{if $warehousing_info.available_act.edit eq 1}
				<a href="javascript:edit_warehousing()">{$lang.erp_operation_edit}</a>
			{/if}
			{if $warehousing_info.available_act.delete eq 1}
				<a href="javascript:delete_warehousing({$warehousing_info.warehousing_id})">{$lang.erp_operation_delete}</a>
			{/if}
	
			{if $warehousing_info.available_act.post_to_approve eq 1}
				<a href="javascript:post_warehousing({$warehousing_info.warehousing_id})">{$lang.erp_operation_post_to_approve}</a>
			{/if}				
			{if $warehousing_info.available_act.approve eq 1}
				<a href="javascript: approve_warehousing({$warehousing_info.warehousing_id},'pass')">{$lang.erp_operation_approve_pass}</a>
				<a href="javascript: approve_warehousing({$warehousing_info.warehousing_id},'reject')">{$lang.erp_operation_approve_reject}</a>
				<a href="javascript:withdrawal_to_edit({$warehousing_info.warehousing_id})">{$lang.erp_operation_withdrawal}</a>
			{/if}
		</td>
		{/if}
 	</tr>

</table>
</div>
<!-- end warehousing info -->

<br/>


{if $act eq 'edit'}
{if $warehousing_info.available_act.edit eq 1}
{if $warehousing_info.warehousing_style_id neq 1}
<div style="width:100%;margin-top:5px;margin-bottom:5px;text-align:left; border:1px solid #BBDDE5;background-color:#F4FAFB;">
	<table width="100%" cellpadding="5" cellspacing="0" border='0'>
		<tr>
			<td>
			<table cellpadding="0" cellspacing="0" >
			<tr>
			<td>
				<span style="margin-left:5px;margin-right:5px;">{$lang.erp_warehousing_input_goods_sn}</span>
			</td>
			<td>
				<input size="15" maxlength="30" id="input_goods_sn" value="" />
			</td>
			
			<td>
				<span id="attr_box">
					
				</span>
			</td>
			
			<td>
				<span style="margin-left:10px;margin-right:5px;">{$lang.erp_warehousing_input_qty}</span>
			</td>
			<td>
				<input id="input_qty" value="" size="5" maxlength="5" />
			</td>
			<td>
				<span style="margin-left:10px;"><input type="image" id="img_submit_warehousing" src="./images/submit.gif" style="cursor:pointer;" /></span>
			</td>
			</tr>
			</table>				
			</td>

		</tr>
	</table>		
</div>
{/if}
{/if}
{/if}

<!-- start warehousing item info -->
 <div class="list-div" id="listDiv">
<table  cellpadding="3" cellspacing="1">
  <tr>
    <th>{$lang.erp_warehousing_item_id}</th>	
	<th width="10%">{$lang.erp_warehousing_item_goods_img}</th>
	<th width="10%">{$lang.erp_warehousing_item_goods_sn}</th>		


	<th>{$lang.erp_warehousing_item_goods_attr}</th>	
	<th>{$lang.erp_warehousing_item_expected_qty}</th>
	<th>{$lang.erp_warehousing_item_received_qty}</th>
	
	{if $price_visible eq 'true'}
		<th>{$lang.erp_warehousing_item_warehousing_price}</th>
	{/if}
	
	{if $act neq 'view' and $act neq 'approve'}
		<th width="10%">{$lang.erp_operation}</th>
	{/if}
  </tr>
  	
	{foreach from=$warehousing_item_info key=key item=warehousing_item_info}
 	<tr id="tr_{$warehousing_item_info.goods_info.goods_barcode}">
		<td align="center">{$key}</td>
		<td align="center">
			<img  {if $warehousing_item_info.goods_details.goods_thumb}id="goods_img_{$warehousing_item_info.warehousing_item_id}"{/if} width="100" height="100" src="{if $warehousing_item_info.goods_details.goods_thumb}{$warehousing_item_info.goods_details.goods_thumb}{else}./images/no_img.gif{/if}">
		</td>
		<td align="center">{$warehousing_item_info.goods_details.goods_sn}</td>

		<td align="center">
			
			{if $warehousing_item_info.selected_attr}
			<table style="width:100px;">
				{foreach from=$warehousing_item_info.selected_attr item=attr}
					<tr>
						<td>{$attr.attr_name}：</td>
						<td>{$attr.attr_value}</td>
					</tr>
				{/foreach}
			</table>
			{else}
				$$	
			{/if}	
			
		</td>
		<td align="center">{$warehousing_item_info.expected_qty}</td>
		<td align="center">
			<span id="span_received_qty_{$warehousing_item_info.warehousing_item_id}">{$warehousing_item_info.received_qty}</span>
			<input size=5 maxlength="5" style="display:none;" id="input_received_qty_{$warehousing_item_info.warehousing_item_id}" value="{$warehousing_item_info.received_qty}" />
		</td>
		
		{if $price_visible eq 'true'}
		<td align="center">
			<span id="span_warehousing_price_{$warehousing_item_info.warehousing_item_id}">{$warehousing_item_info.price}</span>
			<input size="8" maxlength="8" style="display:none;" id="input_warehousing_price_{$warehousing_item_info.warehousing_item_id}" value="{$warehousing_item_info.price}" />
		</td>		
		{/if}
		
		{if $act neq 'view' and $act neq 'approve'}
		<td align="center">
			
			{if $warehousing_info.available_act.edit eq 1}
				<a href="javascript: edit_warehousing_item({$warehousing_item_info.warehousing_item_id})">{$lang.erp_operation_edit}</a>
			{/if}
			{if $warehousing_info.available_act.delete eq 1}
				<a href="javascript:delete_warehousing_item({$warehousing_item_info.warehousing_item_id})">{$lang.erp_operation_delete}</a>
			{/if}				
		</td>
		{/if}
 	</tr>
	{/foreach}
</table>
</div>
<!-- end warehousing item info -->



{include file="pagefooter.htm"}

